package com.woniu.teachmall.mapper;

import com.woniu.teachmall.dto.CarItem;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface CarMapper {
    //添加到购物车
    public int addCar(int userid, int goodItemid);
    //插入新的gooditem
    public int addGoodItem(int userid, int goodid,int num);

    //拿取新的商品项记录
    public int getGoodItem(int userid,int goodid);
    //查看购物车数据
    public List<CarItem> findCarByUserId(int userid);

    void appendNum(int num, int userid, int goodid);

    int getGoodItemId(int userid, int goodid);

    Integer getGoodItemIdBygoodId(int userid, int goodid);

    void clearCar(Integer userId);

    void clearCarItem(Integer userId);
}
